{include file="header.html"}
<div class="title tc ml-30 mr-10">
	<h2>用户注册信息</h2>
</div>
<div class="content px-20">
<form name="myForm" id="myForm" action="/index.php?act=register&st=regSave" method="post">
	<section id="step1">
		<table class="my-10">
		    <tbody>
		        <tr>
		            <td class="pl-20"> 用户账号<em>*</em> </td><td class="pl-15"><input id="User_Account" name="User_Account" type="text" placeholder="字母及数字格式"/><br/><font color='red' id='td_userAccount'></font></td>
		        </tr>
		        <tr>
		            <td class="pl-20"> 账号密码 <em>*</em></td><td class="pl-15"><input id="User_Password" name="User_Password" type="password" placeholder="字母+数字" /><br/><font color='red' id="td_pwd"></font></td>
		        </tr>
		        <tr>
		            <td class="pl-20"> 密码确认<em>*</em> </td><td class="pl-15"><input id="User_Confirm_Password" name="User_Confirm_Password" type="password" /><br/><font color='red' id="td_confirm_pwd"></font></td>
		        </tr>
		    </tbody>
		</table>
		<p class="tc mt-30"><span id="btn_next_step1" class="btn w-150" style="display:inline-block"> 下一步  </span></p>
	</section>
	<section id="step2" style="display:none">
		<table style="margin-top:10px;margin-bottom:20px">
		    <tbody>
		        <tr>
		            <td class="pl-10 tc"> 企业全称 </td><td class="pl-15"><input id="Company_Name" name="Company_Name" type="text"/></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc">企业负责人 </td><td class="pl-15"><input id="Company_Head" name="Company_Head" /></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc"> 企业地址<br><font style="font-size:12px">(与营业执照一致)</font> </td><td class="pl-15"><input id="Company_Address" name="Company_Address" /></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc"> 办公电话 </td><td class="pl-15"><input id="Company_Head_Tel" name="Company_Head_Tel" type="tel" /></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc">联络人姓名 </td><td class="pl-15"><input id="Contact_Name" name="Contact_Name" /></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc"> 部门</td><td class="pl-15"><input id="Contact_Dep" name="Contact_Dep" type="text"/></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc">职位</td><td class="pl-15"><input id="Contact_Job" name="Contact_Job" /></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc">手机号码</td><td class="pl-15"><input id="Contact_Mobile" name="Contact_Mobile" type="tel"/></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc">座机</td><td class="pl-15"><input id="Contact_Tel" name="Contact_Tel" type="tel" /></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc">传真</td><td class="pl-15"><input id="Contact_Fax" name="Contact_Fax" type="tel" /></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc">电子邮箱</td><td class="pl-15"><input id="Contact_Mail" name="Contact_Mail" type="email"/></td>
		        </tr>
		    </tbody>
		</table>
		<p class="tc mt-30"><span id="btn_next_step2" class="btn w-150" style="display:inline-block"> 下一步  </span>	</p>
	</section>
	<section id="step3" style="display:none;margin-bottom:10px">
		<table style="margin-top:10px;margin-bottom:20px">
		    <tbody>
		        <tr>
		            <td class="pl-10 tc"> 组织机构代码 </td><td class="pl-15"><input id="Org_Code" name="Org_Code" type="text" /></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc">营业执照注册号 </td><td class="pl-15"><input id="Org_License_No" name="Org_License_No" type="text" /></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc"> 注册资本 </td><td class="pl-15"><input id="Org_Capital" name="Org_Capital" type="text" /></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc"> 企业类型 </td>
		            <td class="pl-15">
		            	<select name="Org_Type">
		            		<option value="贸易型">贸易型</option>
		            		<option value="生产加工型">生产加工型</option>
		            		<option value="工程建设型">工程建设型</option>
		            	</select>
		            </td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc">主营业务 </td>
		            <td class="pl-15">
		            	<textarea name="Org_Business"></textarea>
		            </td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc"> 欲合作产品</td>
		            <td class="pl-15">
		            	<textarea name="Org_Product"></textarea>
		            </td>
		        </tr>
		    </tbody>
		</table>
		<p class="tc"><button id="btn_submit" class="btn w-150 h-40" type="submit"> 提交验证  </button></p>
	</section>
</form>
<script type="text/javascript">
function showStep() {
	var hash = (!window.location.hash)? "#step1":window.location.hash;
	switch(hash) {
	  case "#step1":
		  $("#step1").show();
		  $("#step2").hide();
		  $("#step3").hide();
		  break;
	  case "#step2":
		  $("#step1").hide();
		  $("#step2").show();
		  $("#step3").hide();
		  break;
	  case "#step3":
		  $("#step1").hide();
		  $("#step2").hide();
		  $("#step3").show();
		  break;
	}
}
$(function(){
	showStep();
	$(window).bind('hashchange', function() {  //监听浏览器前进，后退处理
		//location.reload();
		showStep();
	});
	$("#btn_next_step1").click(function(){
		var userAccount = $.trim($("#User_Account").val());
		var pwd = $.trim($("#User_Password").val());
		var confirm_pwd = $.trim($("#User_Confirm_Password").val());
		if(userAccount == '') {
			$("#td_userAccount").html("用户账号不为空");
			$("#td_userAccount").show();
			$("#User_Account").focus();
			return false;
		}
		if(pwd == '') {
			$("#td_pwd").html("账号密码不为空");
			$("#User_Password").focus();
			return false;
		}
		if(confirm_pwd == '') {
			$("#td_confirm_pwd").html("请再次输入密码");
			$("#User_Confirm_Password").focus();
			return false;
		}
		if(pwd != confirm_pwd) {
			$("#td_confirm_pwd").html("两次输入的密码不匹配");
			$("#User_Password").focus();
			return false;
		}
		window.location.hash = "#step2";
		$("#step1").hide();
		$("#step2").show();
		$("#step3").hide();
	});
	$("#btn_next_step2").click(function(){
		window.location.hash = "#step3";
		$("#step1").hide();
		$("#step2").hide();
		$("#step3").show();
	});
	$("#User_Account").change(function(){
		var user_account = $.trim($("#User_Account").val());
		$.ajax({
			type:"POST",
			url:"{$checkUserRegister}",
			data:{"User_Account":user_account},
			dataType:"json",
			jsonpCallback:"callback",
			timeout:15000,
			success:function(data) {
				if(typeof data.errCode != 'undefined') {
					if(data.errCode == '01') {
						$("#td_userAccount").html(data.msg);
					} else {
						$("#td_userAccount").hide();
					}
				} else {
					alert("网络繁忙，请稍后再试！");
					return false;
				}
			},
			error:function() {
				/* alert("网络繁忙，请稍后再试！");
				return false; */
			}
		});
	});
});

</script>
</div>
{include file="footer.html"}